<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
    <script src="./vue.global.js"></script>
    <link rel="stylesheet" href="./index.css" />
    <link rel="stylesheet" href="./table.css" />
    <link rel="stylesheet" href="./pugong.css" />
    <link rel="stylesheet" href="./utils.css" />
    <script src="./index.full.js"></script>

    <script>
      //适配代码
      (function (doc, win) {
        var docEI = doc.documentElement,
          resizeEvt = "orientationchange" in window ? "orientataionchange" : "resize",
          recalc = function () {
            var clientWidth = docEI.clientWidth;
            if (!clientWidth) return;
            //100是字体大小，1536是开发时浏览器窗口的宽度，等比计算
            docEI.style.fontSize = 100 * (clientWidth / 1536) + "px";
          };

        if (!doc.addEventListener) return;
        win.addEventListener(resizeEvt, recalc, false);
        doc.addEventListener("DOMContentLoaded", recalc, false);
      })(document, window);
    </script>
    <style>
      * {
        /* margin: 0;
        padding: 0; */
        font-size: 0.25rem;
      }
    </style>
  </head>

  <body>
    <div id="app" class="table-content">
      <h3 style="font-size: 0.25rem">班组级安全教育记录</h3>
      <div class="table-form">
        <el-form ref="dataForm" :model="teamEduForm" label-width="138px" class="dataForm">
          <el-row>
            <el-row style="width: 100%">
              <el-col :span="24">
                <el-row style="border-bottom: 1px solid">
                  <el-col :span="24" style="text-align: left; padding-left: 10px"> 教育内容： </el-col>
                </el-row>
                <el-row>
                  <el-col :span="24" style="text-align: left; padding: 5px">
                    <div class="text-indent mb-5px" style="font-weight: 600">一、个人防护用品的安全使用规则</div>
                    <div class="text-indent mb-5px">1.安全帽佩戴时要注意，戴安全帽前应将调整带按自己头型调整到适合的位置，然后将帽带系牢。</div>
                    <div class="text-indent mb-5px">2.安全帽要定期检查，检查有没有龟裂、下凹、裂痕和磨损等情况，发现异常现象要立即更换，不准再继续使用，任何受过重击安全帽，不论有无损坏现象，均应报废。</div>
                    <div class="text-indent mb-5px">3.安全带必须使用五点式安全带，使用时将安全带从手臂绕到肩上，注意不要让安全带交叉或打结，并保持肩带垂直；将胸带腰带通过穿套式搭扣连接，胸带需位于肩部15cm的位置；抓住腿带，将其从臀部两侧穿过，通过搭扣连接；最后调整全身织带。</div>
                    <div class="text-indent mb-5px">4.安全带在使用前要检查各部位是否完好无损，所有零部件应顺滑，无材料或制造缺陷，无尖角或锋利边缘。</div>
                    <div class="text-indent mb-5px">5.安全带高挂低用，将安全带挂在高处，人在下面工作就叫高挂低用，它可以使坠落发生时的实际冲击距离减小。</div>
                    <div class="text-indent mb-5px">6.安全带严禁擅自接长使用，如果使用3m及以上的长绳时必须要加缓冲器，各部件不得任意拆除。</div>
                    <div class="text-indent mb-5px">7.安全带不使用时要妥善保管，不可接触高温、明火、强酸、强碱或尖锐物体，不要存放在潮湿的仓库中保管。</div>
                    <div class="text-indent mb-5px" style="font-weight: 600">二、相关工种的安全操作规程</div>
                    <div class="text-indent mb-5px">见后续相关工种专项考试试卷。</div>
                    <div class="text-indent mb-5px" style="font-weight: 600">三、班组活动制度及纪律</div>
                    <div class="text-indent mb-5px">1.班组长应组织班组成员学习并贯彻执行企业、项目部的安全生产规章制度和安全技术操作规程，制止违章行为。</div>
                    <div class="text-indent mb-5px">2.班组长应组织并参加安全活动,坚持每日班前安全喊话,班中检查安全,班后总结安全。</div>
                    <div class="text-indent mb-5px">3.班组长应配合项目部做好对新进场工人进行岗位安全教育。</div>
                    <div class="text-indent mb-5px">4.由班组长负责班组安全检查,发现不安全因素及时组织力量消除,并报告项目部，发生事故立即报告,并组织抢救,保护现场,做好详细记录。</div>
                    <div class="text-indent mb-5px">5.班组长应搞好生产设备、安全装备、消防设施和易燃易爆物品的等检查维护工作,使其经常保持完好和正常运行。</div>
                    <div class="text-indent mb-5px">6.班组人员必须每日参加班前教育活动,服从班组长管理。</div>
                    <div class="text-indent mb-5px">7.班组长应按时巡回检查,准确分析、判断和处理施工过程中的异常情况。</div>
                    <div class="text-indent mb-5px" style="font-weight: 600">四、班组安全生产基本要求</div>
                    <div class="text-indent mb-5px">1.班组人员必须参加班组安全活动,学习安全技术知识,严格遵守各项安全生产规章制度。</div>
                    <div class="text-indent mb-5px">2.施工前必须认真检查本岗位的设备和安全设施是否齐全完好。</div>
                    <div class="text-indent mb-5px">3.正确使用，妥善保管各种劳动防护用品、器具和防护器材、消防器材。</div>
                    <div class="text-indent mb-5px">4.不违章作业,并劝阻或制止他人违章作业,对违章指挥有权拒绝执行,同时及时向上级领导报告。</div>
                    <div class="text-indent mb-5px">5.做到工完料清，保证现场文明施工达标。</div>
                    <div class="text-indent mb-5px" style="font-weight: 600">五、岗位之间工作衔接配合的安全注意事项</div>
                    <div class="text-indent mb-5px">由班组长结合本工种特点讲解。</div>
                  </el-col>
                </el-row>
                <el-row>
                  <el-col :span="12">
                    <el-form-item label="主讲人" prop="" class="formItemDuty" style="display: flex; align-items: center">
                      <div class="formItemDutyIn" style="width: 100%; height: 0.36rem">
                        <!-- <el-input class="formItemDutyIn" v-show="!teamEduForm.person" style="height: 0.36rem;"></el-input> -->
                        <el-image class="sign_img2" v-show="teamEduForm.speakerSign" :src="teamEduForm.speakerSign" fit="fill"></el-image>
                      </div>
                    </el-form-item>
                  </el-col>
                  <el-col :span="12">
                    <el-form-item label="受教育人" prop="" class="formItemDuty" style="display: flex; align-items: center" @click="setUpEquipment('teamEduForm.eiSign','TaskSignFinger')">
                      <div class="formItemDutyIn" style="width: 100%; height: 0.36rem">
                        <!-- <el-input class="formItemDutyIn" v-show="!teamEduForm.person" style="height: 0.36rem;"></el-input> -->
                        <el-image class="sign_img2" v-show="teamEduForm.eiSign" :src="teamEduForm.eiSign" fit="fill"></el-image>
                      </div>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row>
                  <el-col :span="24">
                    <el-form-item label="受教育时间" prop="" class="formItemDuty" style="display: flex; align-items: center">
                      <div class="formItemDutyIn" style="width: 100%; height: 0.36rem; line-height: 0.36rem">
                        <el-input v-model="teamEduForm.syear" @input="onInput($event,'syear')" class="people-input" placeholder=" " style="width: 0.8rem"></el-input>
                        年
                        <el-input v-model="teamEduForm.smonth" @input="onInput($event,'smonth')" class="people-input" placeholder=" " style="width: 0.5rem"></el-input>
                        月
                        <el-input v-model="teamEduForm.sday" @input="onInput($event,'sday')" class="people-input" placeholder=" " style="width: 0.5rem"></el-input>
                        日
                        <span style="margin: 0 10px">至</span>
                        <el-input v-model="teamEduForm.eyear" @input="onInput($event,'eyear')" class="people-input" placeholder=" " style="width: 0.8rem"></el-input>
                        年
                        <el-input v-model="teamEduForm.emonth" @input="onInput($event,'emonth')" class="people-input" placeholder=" " style="width: 0.5rem"></el-input>
                        月
                        <el-input v-model="teamEduForm.eday" @input="onInput($event,'eday')" class="people-input" placeholder=" " style="width: 0.5rem"></el-input>
                        日
                      </div>
                    </el-form-item>
                  </el-col>
                </el-row>
              </el-col>
            </el-row>
          </el-row>
        </el-form>
      </div>
    </div>
    <script>
      const { createApp, reactive, toRefs, ref, onMounted } = Vue;
      const vue3Composition = {
        setup() {
          const teamEduForm = ref({
            speakerSign: "", // 主讲人
            eiSign: "", // 受教育人
            syear: "",
            smonth: "",
            sday: "",
            eyear: "",
            emonth: "",
            eday: "",
          });

          window.setSign = (event) => {
            teamEduForm.value[event.key] = event.img;
          };

          window.getData = (event) => {
            return teamEduForm.value;
          };
          window.setData = (data) => {
            // 左边  当天-2
            const today = new Date();
            // 复制日期对象以避免修改原始日期
            const pastDate = new Date(today);
            // 减去4天
            pastDate.setDate(today.getDate() - 2);
            teamEduForm.value.syear = pastDate.getFullYear().toString();
            teamEduForm.value.smonth = String(pastDate.getMonth() + 1).padStart(2, "0"); // 月份从0开始，需+1并补零
            teamEduForm.value.sday = String(pastDate.getDate()).padStart(2, "0"); // 日期补零
            // 右边 当天
            const cpastDate = new Date(today);
            cpastDate.setDate(today.getDate());
            teamEduForm.value.eyear = cpastDate.getFullYear().toString();
            teamEduForm.value.emonth = String(cpastDate.getMonth() + 1).padStart(2, "0");
            teamEduForm.value.eday = String(cpastDate.getDate()).padStart(2, "0");
            teamEduForm.value.speakerSign =
              "";
          };
          const onInput = (e, key) => {
            window.parent.postMessage(
              {
                key,
                isFill: e != "",
                form: "teamEduForm",
              },
              "*"
            );
          };
          const setUpEquipment = (key, type) => {
            window.parent.childListener({
              key,
              type,
            });
          };
          return {
            teamEduForm,
            setUpEquipment,
            onInput,
          };
        },
      };
      const app = createApp(vue3Composition).use(ElementPlus).mount("#app");
    </script>
  </body>
</html>
